<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<meta name="generator" content="pdoc 0.10.0" />
<title>netmiko.huawei.huawei API documentation</title>
<meta name="description" content="" />
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/sanitize.min.css" integrity="sha256-PK9q560IAAa6WVRRh76LtCaI8pjTJ2z11v0miyNNjrs=" crossorigin>
<link rel="preload stylesheet" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/11.0.1/typography.min.css" integrity="sha256-7l/o7C8jubJiy74VsKTidCy1yBkRtiUGbVkYBylBqUg=" crossorigin>
<link rel="stylesheet preload" as="style" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/github.min.css" crossorigin>
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:30px;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:1em 0 .50em 0}h3{font-size:1.4em;margin:25px 0 10px 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .3s ease-in-out}a:hover{color:#e82}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900}pre code{background:#f8f8f8;font-size:.8em;line-height:1.4em}code{background:#f2f2f1;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{background:#f8f8f8;border:0;border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0;padding:1ex}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-weight:bold;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em .5em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.item .name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul{padding-left:1.5em}.toc > ul > li{margin-top:.5em}}</style>
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js" integrity="sha256-Uv3H6lx7dJmRfRvH8TH6kJD1TSK1aFcwgx+mdg3epi8=" crossorigin></script>
<script>window.addEventListener('DOMContentLoaded', () => hljs.initHighlighting())</script>
</head>
<body>
<main>
<article id="content">
<header>
<h1 class="title">Module <code>netmiko.huawei.huawei</code></h1>
</header>
<section id="section-intro">
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">from typing import Optional, Any, Union, Sequence, Iterator, TextIO
import time
import re
import warnings

from netmiko.no_enable import NoEnable
from netmiko.base_connection import DELAY_FACTOR_DEPR_SIMPLE_MSG
from netmiko.cisco_base_connection import CiscoBaseConnection
from netmiko.exceptions import NetmikoAuthenticationException
from netmiko import log


class HuaweiBase(NoEnable, CiscoBaseConnection):
    def session_preparation(self) -&gt; None:
        &#34;&#34;&#34;Prepare the session after the connection has been established.&#34;&#34;&#34;
        self.ansi_escape_codes = True
        # The _test_channel_read happens in special_login_handler()
        self.set_base_prompt()
        self.disable_paging(command=&#34;screen-length 0 temporary&#34;)

    def strip_ansi_escape_codes(self, string_buffer: str) -&gt; str:
        &#34;&#34;&#34;
        Huawei does a strange thing where they add a space and then add ESC[1D
        to move the cursor to the left one.

        The extra space is problematic.
        &#34;&#34;&#34;
        code_cursor_left = chr(27) + r&#34;\[\d+D&#34;
        output = string_buffer
        pattern = rf&#34; {code_cursor_left}&#34;
        output = re.sub(pattern, &#34;&#34;, output)

        return super().strip_ansi_escape_codes(output)

    def config_mode(
        self,
        config_command: str = &#34;system-view&#34;,
        pattern: str = &#34;&#34;,
        re_flags: int = 0,
    ) -&gt; str:
        return super().config_mode(
            config_command=config_command, pattern=pattern, re_flags=re_flags
        )

    def exit_config_mode(self, exit_config: str = &#34;return&#34;, pattern: str = r&#34;&gt;&#34;) -&gt; str:
        &#34;&#34;&#34;Exit configuration mode.&#34;&#34;&#34;
        return super().exit_config_mode(exit_config=exit_config, pattern=pattern)

    def check_config_mode(
        self, check_string: str = &#34;]&#34;, pattern: str = &#34;&#34;, force_regex: bool = False
    ) -&gt; bool:
        &#34;&#34;&#34;Checks whether in configuration mode. Returns a boolean.&#34;&#34;&#34;
        return super().check_config_mode(check_string=check_string)

    def set_base_prompt(
        self,
        pri_prompt_terminator: str = &#34;&gt;&#34;,
        alt_prompt_terminator: str = &#34;]&#34;,
        delay_factor: float = 1.0,
        pattern: Optional[str] = None,
    ) -&gt; str:
        &#34;&#34;&#34;
        Sets self.base_prompt

        Used as delimiter for stripping of trailing prompt in output.

        Should be set to something that is general and applies in multiple contexts.
        For Huawei this will be the router prompt with &lt; &gt; or [ ] stripped off.

        This will be set on logging in, but not when entering system-view
        &#34;&#34;&#34;

        prompt = super().set_base_prompt(
            pri_prompt_terminator=pri_prompt_terminator,
            alt_prompt_terminator=alt_prompt_terminator,
            delay_factor=delay_factor,
            pattern=pattern,
        )

        # Strip off any leading HRP_. characters for USGv5 HA
        prompt = re.sub(r&#34;^HRP_.&#34;, &#34;&#34;, prompt, flags=re.M)

        # Strip off leading terminator
        prompt = prompt[1:]
        prompt = prompt.strip()
        self.base_prompt = prompt
        log.debug(f&#34;prompt: {self.base_prompt}&#34;)
        return self.base_prompt

    def save_config(
        self, cmd: str = &#34;save&#34;, confirm: bool = True, confirm_response: str = &#34;y&#34;
    ) -&gt; str:
        &#34;&#34;&#34;Save Config for HuaweiSSH&#34;&#34;&#34;
        return super().save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )

    def cleanup(self, command: str = &#34;quit&#34;) -&gt; None:
        return super().cleanup(command=command)


class HuaweiSSH(HuaweiBase):
    &#34;&#34;&#34;Huawei SSH driver.&#34;&#34;&#34;

    def special_login_handler(self, delay_factor: float = 1.0) -&gt; None:
        # Huawei prompts for password change before displaying the initial base prompt.
        # Search for that password change prompt or for base prompt.
        password_change_prompt = r&#34;(Change now|Please choose)&#34;
        prompt_or_password_change = r&#34;(?:Change now|Please choose|[&gt;\]])&#34;
        data = self.read_until_pattern(pattern=prompt_or_password_change)
        if re.search(password_change_prompt, data):
            self.write_channel(&#34;N&#34; + self.RETURN)
            self.read_until_pattern(pattern=r&#34;[&gt;\]]&#34;)


class HuaweiTelnet(HuaweiBase):
    &#34;&#34;&#34;Huawei Telnet driver.&#34;&#34;&#34;

    def telnet_login(
        self,
        pri_prompt_terminator: str = r&#34;]\s*$&#34;,
        alt_prompt_terminator: str = r&#34;&gt;\s*$&#34;,
        username_pattern: str = r&#34;(?:user:|username|login|user name)&#34;,
        pwd_pattern: str = r&#34;assword&#34;,
        delay_factor: float = 1.0,
        max_loops: int = 20,
    ) -&gt; str:
        &#34;&#34;&#34;Telnet login for Huawei Devices&#34;&#34;&#34;

        delay_factor = self.select_delay_factor(delay_factor)
        password_change_prompt = r&#34;(Change now|Please choose &#39;YES&#39; or &#39;NO&#39;).+&#34;
        combined_pattern = r&#34;({}|{}|{})&#34;.format(
            pri_prompt_terminator, alt_prompt_terminator, password_change_prompt
        )

        output = &#34;&#34;
        return_msg = &#34;&#34;
        i = 1
        while i &lt;= max_loops:
            try:
                # Search for username pattern / send username
                output = self.read_until_pattern(
                    pattern=username_pattern, re_flags=re.I
                )
                return_msg += output
                self.write_channel(self.username + self.TELNET_RETURN)

                # Search for password pattern / send password
                output = self.read_until_pattern(pattern=pwd_pattern, re_flags=re.I)
                return_msg += output
                assert self.password is not None
                self.write_channel(self.password + self.TELNET_RETURN)

                # Waiting for combined output
                output = self.read_until_pattern(pattern=combined_pattern)
                return_msg += output

                # Search for password change prompt, send &#34;N&#34;
                if re.search(password_change_prompt, output):
                    self.write_channel(&#34;N&#34; + self.TELNET_RETURN)
                    output = self.read_until_pattern(pattern=combined_pattern)
                    return_msg += output

                # Check if proper data received
                if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
                    alt_prompt_terminator, output, flags=re.M
                ):
                    return return_msg

                self.write_channel(self.TELNET_RETURN)
                time.sleep(0.5 * delay_factor)
                i += 1

            except EOFError:
                assert self.remote_conn is not None
                self.remote_conn.close()
                msg = f&#34;Login failed: {self.host}&#34;
                raise NetmikoAuthenticationException(msg)

        # Last try to see if we already logged in
        self.write_channel(self.TELNET_RETURN)
        time.sleep(0.5 * delay_factor)
        output = self.read_channel()
        return_msg += output
        if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
            alt_prompt_terminator, output, flags=re.M
        ):
            return return_msg

        assert self.remote_conn is not None
        self.remote_conn.close()
        msg = f&#34;Login failed: {self.host}&#34;
        raise NetmikoAuthenticationException(msg)


class HuaweiVrpv8SSH(HuaweiSSH):
    def send_config_set(
        self,
        config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
        exit_config_mode: bool = False,
        **kwargs: Any,
    ) -&gt; str:
        &#34;&#34;&#34;Huawei VRPv8 requires you not exit from configuration mode.&#34;&#34;&#34;
        return super().send_config_set(
            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
        )

    def commit(
        self,
        comment: str = &#34;&#34;,
        read_timeout: float = 120.0,
        delay_factor: Optional[float] = None,
    ) -&gt; str:
        &#34;&#34;&#34;
        Commit the candidate configuration.

        Commit the entered configuration. Raise an error and return the failure
        if the commit fails.

        default:
           command_string = commit
        comment:
           command_string = commit comment &lt;comment&gt;

        delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
        &#34;&#34;&#34;

        if delay_factor is not None:
            warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning)

        error_marker = &#34;Failed to generate committed config&#34;
        command_string = &#34;commit&#34;

        if comment:
            command_string += f&#39; comment &#34;{comment}&#34;&#39;

        output = self.config_mode()
        output += self._send_command_str(
            command_string,
            strip_prompt=False,
            strip_command=False,
            read_timeout=read_timeout,
            expect_string=r&#34;]&#34;,
        )
        output += self.exit_config_mode()

        if error_marker in output:
            raise ValueError(f&#34;Commit failed with following errors:\n\n{output}&#34;)
        return output

    def save_config(self, *args: Any, **kwargs: Any) -&gt; str:
        &#34;&#34;&#34;Not Implemented&#34;&#34;&#34;
        raise NotImplementedError</code></pre>
</details>
</section>
<section>
</section>
<section>
</section>
<section>
</section>
<section>
<h2 class="section-title" id="header-classes">Classes</h2>
<dl>
<dt id="netmiko.huawei.huawei.HuaweiBase"><code class="flex name class">
<span>class <span class="ident">HuaweiBase</span></span>
<span>(</span><span>ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[<a title="netmiko.session_log.SessionLog" href="../session_log.html#netmiko.session_log.SessionLog">SessionLog</a>] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)</span>
</code></dt>
<dd>
<div class="desc"><p>Class for platforms that have no enable mode.</p>
<p>Netmiko translates the meaning of "enable" mode to be a proxy for "can
go into config mode". In other words, that you ultimately have privileges
to execute configuration changes.</p>
<p>The expectation on platforms that have no method for elevating privileges
is that the standard default privileges allow configuration changes.</p>
<p>Consequently check_enable_mode returns True by default for platforms that
don't explicitly support enable mode.</p>
<pre><code>    Initialize attributes for establishing connection to target device.

    :param ip: IP address of target device. Not required if &lt;code&gt;host&lt;/code&gt; is
        provided.

    :param host: Hostname of target device. Not required if &lt;code&gt;ip&lt;/code&gt; is
            provided.

    :param username: Username to authenticate against target device if
            required.

    :param password: Password to authenticate against target device if
            required.

    :param secret: The enable password if target device requires one.

    :param port: The destination port used to connect to the target
            device.

    :param device_type: Class selection based on device type.

    :param verbose: Enable additional messages to standard output.

    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).

    :param use_keys: Connect to target device using SSH keys.

    :param key_file: Filename path of the SSH key file to use.

    :param pkey: SSH key object to use.

    :param passphrase: Passphrase to use for encrypted key; password will be used for key
            decryption if not specified.

    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
            documentation for a description of the expected format.

    :param allow_agent: Enable use of SSH key-agent.

    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
            means unknown SSH host keys will be accepted).

    :param system_host_keys: Load host keys from the users known_hosts file.

    :param alt_host_keys: If &lt;code&gt;True&lt;/code&gt; host keys will be loaded from the file specified in
            alt_key_file.

    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).

    :param ssh_config_file: File name of OpenSSH configuration file.

    :param timeout: Connection timeout.

    :param session_timeout: Set a timeout for parallel requests.

    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.

    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).

    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
            Currently defaults to 0, for backwards compatibility (it will not attempt
            to keep the connection alive).

    :param default_enter: Character(s) to send to correspond to enter key (default:
</code></pre>
<p>).</p>
<pre><code>    :param response_return: Character(s) to use in normalized return data to represent
            enter key (default:
</code></pre>
<p>)</p>
<pre><code>    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
            to select smallest of global and specific. Sets default global_delay_factor to .1
            (default: True)

    :param session_log: File path or BufferedIOBase subclass object to write the session log to.

    :param session_log_record_writes: The session log generally only records channel reads due
            to eliminate command duplication due to command echo. You can enable this if you
            want to record both channel reads and channel writes in the log (default: False).

    :param session_log_file_mode: "write" or "append" for session_log file mode
            (default: "write")

    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
            (default: False)

    :param encoding: Encoding to be used when writing bytes to the output channel.
            (default: ascii)

    :param sock: An open socket or socket-like object (such as a &lt;code&gt;.Channel&lt;/code&gt;) to use for
            communication to the target host (default: None).

    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
            (default: None). Global attribute takes precedence over function &lt;code&gt;cmd\_verify&lt;/code&gt;
            argument. Value of &lt;code&gt;None&lt;/code&gt; indicates to use function &lt;code&gt;cmd\_verify&lt;/code&gt; argument.

    :param auto_connect: Control whether Netmiko automatically establishes the connection as
            part of the object creation (default: True).

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
            eliminated in Netmiko 5.x (default: False).
</code></pre></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class HuaweiBase(NoEnable, CiscoBaseConnection):
    def session_preparation(self) -&gt; None:
        &#34;&#34;&#34;Prepare the session after the connection has been established.&#34;&#34;&#34;
        self.ansi_escape_codes = True
        # The _test_channel_read happens in special_login_handler()
        self.set_base_prompt()
        self.disable_paging(command=&#34;screen-length 0 temporary&#34;)

    def strip_ansi_escape_codes(self, string_buffer: str) -&gt; str:
        &#34;&#34;&#34;
        Huawei does a strange thing where they add a space and then add ESC[1D
        to move the cursor to the left one.

        The extra space is problematic.
        &#34;&#34;&#34;
        code_cursor_left = chr(27) + r&#34;\[\d+D&#34;
        output = string_buffer
        pattern = rf&#34; {code_cursor_left}&#34;
        output = re.sub(pattern, &#34;&#34;, output)

        return super().strip_ansi_escape_codes(output)

    def config_mode(
        self,
        config_command: str = &#34;system-view&#34;,
        pattern: str = &#34;&#34;,
        re_flags: int = 0,
    ) -&gt; str:
        return super().config_mode(
            config_command=config_command, pattern=pattern, re_flags=re_flags
        )

    def exit_config_mode(self, exit_config: str = &#34;return&#34;, pattern: str = r&#34;&gt;&#34;) -&gt; str:
        &#34;&#34;&#34;Exit configuration mode.&#34;&#34;&#34;
        return super().exit_config_mode(exit_config=exit_config, pattern=pattern)

    def check_config_mode(
        self, check_string: str = &#34;]&#34;, pattern: str = &#34;&#34;, force_regex: bool = False
    ) -&gt; bool:
        &#34;&#34;&#34;Checks whether in configuration mode. Returns a boolean.&#34;&#34;&#34;
        return super().check_config_mode(check_string=check_string)

    def set_base_prompt(
        self,
        pri_prompt_terminator: str = &#34;&gt;&#34;,
        alt_prompt_terminator: str = &#34;]&#34;,
        delay_factor: float = 1.0,
        pattern: Optional[str] = None,
    ) -&gt; str:
        &#34;&#34;&#34;
        Sets self.base_prompt

        Used as delimiter for stripping of trailing prompt in output.

        Should be set to something that is general and applies in multiple contexts.
        For Huawei this will be the router prompt with &lt; &gt; or [ ] stripped off.

        This will be set on logging in, but not when entering system-view
        &#34;&#34;&#34;

        prompt = super().set_base_prompt(
            pri_prompt_terminator=pri_prompt_terminator,
            alt_prompt_terminator=alt_prompt_terminator,
            delay_factor=delay_factor,
            pattern=pattern,
        )

        # Strip off any leading HRP_. characters for USGv5 HA
        prompt = re.sub(r&#34;^HRP_.&#34;, &#34;&#34;, prompt, flags=re.M)

        # Strip off leading terminator
        prompt = prompt[1:]
        prompt = prompt.strip()
        self.base_prompt = prompt
        log.debug(f&#34;prompt: {self.base_prompt}&#34;)
        return self.base_prompt

    def save_config(
        self, cmd: str = &#34;save&#34;, confirm: bool = True, confirm_response: str = &#34;y&#34;
    ) -&gt; str:
        &#34;&#34;&#34;Save Config for HuaweiSSH&#34;&#34;&#34;
        return super().save_config(
            cmd=cmd, confirm=confirm, confirm_response=confirm_response
        )

    def cleanup(self, command: str = &#34;quit&#34;) -&gt; None:
        return super().cleanup(command=command)</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="netmiko.no_enable.NoEnable" href="../no_enable.html#netmiko.no_enable.NoEnable">NoEnable</a></li>
<li><a title="netmiko.cisco_base_connection.CiscoBaseConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection">CiscoBaseConnection</a></li>
<li><a title="netmiko.base_connection.BaseConnection" href="../base_connection.html#netmiko.base_connection.BaseConnection">BaseConnection</a></li>
</ul>
<h3>Subclasses</h3>
<ul class="hlist">
<li><a title="netmiko.huawei.huawei.HuaweiSSH" href="#netmiko.huawei.huawei.HuaweiSSH">HuaweiSSH</a></li>
<li><a title="netmiko.huawei.huawei.HuaweiTelnet" href="#netmiko.huawei.huawei.HuaweiTelnet">HuaweiTelnet</a></li>
</ul>
<h3>Methods</h3>
<dl>
<dt id="netmiko.huawei.huawei.HuaweiBase.check_config_mode"><code class="name flex">
<span>def <span class="ident">check_config_mode</span></span>(<span>self, check_string: str = ']', pattern: str = '', force_regex: bool = False) ‑> bool</span>
</code></dt>
<dd>
<div class="desc"><p>Checks whether in configuration mode. Returns a boolean.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def check_config_mode(
    self, check_string: str = &#34;]&#34;, pattern: str = &#34;&#34;, force_regex: bool = False
) -&gt; bool:
    &#34;&#34;&#34;Checks whether in configuration mode. Returns a boolean.&#34;&#34;&#34;
    return super().check_config_mode(check_string=check_string)</code></pre>
</details>
</dd>
<dt id="netmiko.huawei.huawei.HuaweiBase.exit_config_mode"><code class="name flex">
<span>def <span class="ident">exit_config_mode</span></span>(<span>self, exit_config: str = 'return', pattern: str = &#x27;&gt;&#x27;) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>Exit configuration mode.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def exit_config_mode(self, exit_config: str = &#34;return&#34;, pattern: str = r&#34;&gt;&#34;) -&gt; str:
    &#34;&#34;&#34;Exit configuration mode.&#34;&#34;&#34;
    return super().exit_config_mode(exit_config=exit_config, pattern=pattern)</code></pre>
</details>
</dd>
<dt id="netmiko.huawei.huawei.HuaweiBase.save_config"><code class="name flex">
<span>def <span class="ident">save_config</span></span>(<span>self, cmd: str = 'save', confirm: bool = True, confirm_response: str = 'y') ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>Save Config for HuaweiSSH</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def save_config(
    self, cmd: str = &#34;save&#34;, confirm: bool = True, confirm_response: str = &#34;y&#34;
) -&gt; str:
    &#34;&#34;&#34;Save Config for HuaweiSSH&#34;&#34;&#34;
    return super().save_config(
        cmd=cmd, confirm=confirm, confirm_response=confirm_response
    )</code></pre>
</details>
</dd>
<dt id="netmiko.huawei.huawei.HuaweiBase.session_preparation"><code class="name flex">
<span>def <span class="ident">session_preparation</span></span>(<span>self) ‑> None</span>
</code></dt>
<dd>
<div class="desc"><p>Prepare the session after the connection has been established.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def session_preparation(self) -&gt; None:
    &#34;&#34;&#34;Prepare the session after the connection has been established.&#34;&#34;&#34;
    self.ansi_escape_codes = True
    # The _test_channel_read happens in special_login_handler()
    self.set_base_prompt()
    self.disable_paging(command=&#34;screen-length 0 temporary&#34;)</code></pre>
</details>
</dd>
<dt id="netmiko.huawei.huawei.HuaweiBase.set_base_prompt"><code class="name flex">
<span>def <span class="ident">set_base_prompt</span></span>(<span>self, pri_prompt_terminator: str = &#x27;&gt;&#x27;, alt_prompt_terminator: str = ']', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>Sets self.base_prompt</p>
<p>Used as delimiter for stripping of trailing prompt in output.</p>
<p>Should be set to something that is general and applies in multiple contexts.
For Huawei this will be the router prompt with &lt; &gt; or [ ] stripped off.</p>
<p>This will be set on logging in, but not when entering system-view</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def set_base_prompt(
    self,
    pri_prompt_terminator: str = &#34;&gt;&#34;,
    alt_prompt_terminator: str = &#34;]&#34;,
    delay_factor: float = 1.0,
    pattern: Optional[str] = None,
) -&gt; str:
    &#34;&#34;&#34;
    Sets self.base_prompt

    Used as delimiter for stripping of trailing prompt in output.

    Should be set to something that is general and applies in multiple contexts.
    For Huawei this will be the router prompt with &lt; &gt; or [ ] stripped off.

    This will be set on logging in, but not when entering system-view
    &#34;&#34;&#34;

    prompt = super().set_base_prompt(
        pri_prompt_terminator=pri_prompt_terminator,
        alt_prompt_terminator=alt_prompt_terminator,
        delay_factor=delay_factor,
        pattern=pattern,
    )

    # Strip off any leading HRP_. characters for USGv5 HA
    prompt = re.sub(r&#34;^HRP_.&#34;, &#34;&#34;, prompt, flags=re.M)

    # Strip off leading terminator
    prompt = prompt[1:]
    prompt = prompt.strip()
    self.base_prompt = prompt
    log.debug(f&#34;prompt: {self.base_prompt}&#34;)
    return self.base_prompt</code></pre>
</details>
</dd>
<dt id="netmiko.huawei.huawei.HuaweiBase.strip_ansi_escape_codes"><code class="name flex">
<span>def <span class="ident">strip_ansi_escape_codes</span></span>(<span>self, string_buffer: str) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>Huawei does a strange thing where they add a space and then add ESC[1D
to move the cursor to the left one.</p>
<p>The extra space is problematic.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def strip_ansi_escape_codes(self, string_buffer: str) -&gt; str:
    &#34;&#34;&#34;
    Huawei does a strange thing where they add a space and then add ESC[1D
    to move the cursor to the left one.

    The extra space is problematic.
    &#34;&#34;&#34;
    code_cursor_left = chr(27) + r&#34;\[\d+D&#34;
    output = string_buffer
    pattern = rf&#34; {code_cursor_left}&#34;
    output = re.sub(pattern, &#34;&#34;, output)

    return super().strip_ansi_escape_codes(output)</code></pre>
</details>
</dd>
</dl>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="netmiko.cisco_base_connection.CiscoBaseConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection">CiscoBaseConnection</a></b></code>:
<ul class="hlist">
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.check_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.check_enable_mode">check_enable_mode</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.cleanup" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.cleanup">cleanup</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.clear_buffer" href="../base_connection.html#netmiko.base_connection.BaseConnection.clear_buffer">clear_buffer</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.commit" href="../base_connection.html#netmiko.base_connection.BaseConnection.commit">commit</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.config_mode" href="../base_connection.html#netmiko.base_connection.BaseConnection.config_mode">config_mode</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.disable_paging" href="../base_connection.html#netmiko.base_connection.BaseConnection.disable_paging">disable_paging</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.disconnect" href="../base_connection.html#netmiko.base_connection.BaseConnection.disconnect">disconnect</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.enable" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.enable">enable</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.establish_connection" href="../base_connection.html#netmiko.base_connection.BaseConnection.establish_connection">establish_connection</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.exit_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.exit_enable_mode">exit_enable_mode</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.find_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.find_prompt">find_prompt</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.is_alive" href="../base_connection.html#netmiko.base_connection.BaseConnection.is_alive">is_alive</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.normalize_cmd" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_cmd">normalize_cmd</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.normalize_linefeeds" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_linefeeds">normalize_linefeeds</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.paramiko_cleanup" href="../base_connection.html#netmiko.base_connection.BaseConnection.paramiko_cleanup">paramiko_cleanup</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.read_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel">read_channel</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.read_channel_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel_timing">read_channel_timing</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.read_until_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_pattern">read_until_pattern</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.read_until_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt">read_until_prompt</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.read_until_prompt_or_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt_or_pattern">read_until_prompt_or_pattern</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.run_ttp" href="../base_connection.html#netmiko.base_connection.BaseConnection.run_ttp">run_ttp</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.select_delay_factor" href="../base_connection.html#netmiko.base_connection.BaseConnection.select_delay_factor">select_delay_factor</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.send_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command">send_command</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.send_command_expect" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_expect">send_command_expect</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.send_command_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_timing">send_command_timing</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.send_config_from_file" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_from_file">send_config_from_file</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.send_config_set" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_set">send_config_set</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.send_multiline" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_multiline">send_multiline</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.set_terminal_width" href="../base_connection.html#netmiko.base_connection.BaseConnection.set_terminal_width">set_terminal_width</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.special_login_handler" href="../base_connection.html#netmiko.base_connection.BaseConnection.special_login_handler">special_login_handler</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.strip_backspaces" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_backspaces">strip_backspaces</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.strip_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_command">strip_command</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.strip_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_prompt">strip_prompt</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.telnet_login" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.telnet_login">telnet_login</a></code></li>
<li><code><a title="netmiko.cisco_base_connection.CiscoBaseConnection.write_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.write_channel">write_channel</a></code></li>
</ul>
</li>
</ul>
</dd>
<dt id="netmiko.huawei.huawei.HuaweiSSH"><code class="flex name class">
<span>class <span class="ident">HuaweiSSH</span></span>
<span>(</span><span>ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[<a title="netmiko.session_log.SessionLog" href="../session_log.html#netmiko.session_log.SessionLog">SessionLog</a>] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)</span>
</code></dt>
<dd>
<div class="desc"><p>Huawei SSH driver.</p>
<pre><code>    Initialize attributes for establishing connection to target device.

    :param ip: IP address of target device. Not required if &lt;code&gt;host&lt;/code&gt; is
        provided.

    :param host: Hostname of target device. Not required if &lt;code&gt;ip&lt;/code&gt; is
            provided.

    :param username: Username to authenticate against target device if
            required.

    :param password: Password to authenticate against target device if
            required.

    :param secret: The enable password if target device requires one.

    :param port: The destination port used to connect to the target
            device.

    :param device_type: Class selection based on device type.

    :param verbose: Enable additional messages to standard output.

    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).

    :param use_keys: Connect to target device using SSH keys.

    :param key_file: Filename path of the SSH key file to use.

    :param pkey: SSH key object to use.

    :param passphrase: Passphrase to use for encrypted key; password will be used for key
            decryption if not specified.

    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
            documentation for a description of the expected format.

    :param allow_agent: Enable use of SSH key-agent.

    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
            means unknown SSH host keys will be accepted).

    :param system_host_keys: Load host keys from the users known_hosts file.

    :param alt_host_keys: If &lt;code&gt;True&lt;/code&gt; host keys will be loaded from the file specified in
            alt_key_file.

    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).

    :param ssh_config_file: File name of OpenSSH configuration file.

    :param timeout: Connection timeout.

    :param session_timeout: Set a timeout for parallel requests.

    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.

    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).

    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
            Currently defaults to 0, for backwards compatibility (it will not attempt
            to keep the connection alive).

    :param default_enter: Character(s) to send to correspond to enter key (default:
</code></pre>
<p>).</p>
<pre><code>    :param response_return: Character(s) to use in normalized return data to represent
            enter key (default:
</code></pre>
<p>)</p>
<pre><code>    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
            to select smallest of global and specific. Sets default global_delay_factor to .1
            (default: True)

    :param session_log: File path or BufferedIOBase subclass object to write the session log to.

    :param session_log_record_writes: The session log generally only records channel reads due
            to eliminate command duplication due to command echo. You can enable this if you
            want to record both channel reads and channel writes in the log (default: False).

    :param session_log_file_mode: "write" or "append" for session_log file mode
            (default: "write")

    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
            (default: False)

    :param encoding: Encoding to be used when writing bytes to the output channel.
            (default: ascii)

    :param sock: An open socket or socket-like object (such as a &lt;code&gt;.Channel&lt;/code&gt;) to use for
            communication to the target host (default: None).

    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
            (default: None). Global attribute takes precedence over function &lt;code&gt;cmd\_verify&lt;/code&gt;
            argument. Value of &lt;code&gt;None&lt;/code&gt; indicates to use function &lt;code&gt;cmd\_verify&lt;/code&gt; argument.

    :param auto_connect: Control whether Netmiko automatically establishes the connection as
            part of the object creation (default: True).

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
            eliminated in Netmiko 5.x (default: False).
</code></pre></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class HuaweiSSH(HuaweiBase):
    &#34;&#34;&#34;Huawei SSH driver.&#34;&#34;&#34;

    def special_login_handler(self, delay_factor: float = 1.0) -&gt; None:
        # Huawei prompts for password change before displaying the initial base prompt.
        # Search for that password change prompt or for base prompt.
        password_change_prompt = r&#34;(Change now|Please choose)&#34;
        prompt_or_password_change = r&#34;(?:Change now|Please choose|[&gt;\]])&#34;
        data = self.read_until_pattern(pattern=prompt_or_password_change)
        if re.search(password_change_prompt, data):
            self.write_channel(&#34;N&#34; + self.RETURN)
            self.read_until_pattern(pattern=r&#34;[&gt;\]]&#34;)</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="netmiko.huawei.huawei.HuaweiBase" href="#netmiko.huawei.huawei.HuaweiBase">HuaweiBase</a></li>
<li><a title="netmiko.no_enable.NoEnable" href="../no_enable.html#netmiko.no_enable.NoEnable">NoEnable</a></li>
<li><a title="netmiko.cisco_base_connection.CiscoBaseConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection">CiscoBaseConnection</a></li>
<li><a title="netmiko.base_connection.BaseConnection" href="../base_connection.html#netmiko.base_connection.BaseConnection">BaseConnection</a></li>
</ul>
<h3>Subclasses</h3>
<ul class="hlist">
<li><a title="netmiko.huawei.huawei.HuaweiVrpv8SSH" href="#netmiko.huawei.huawei.HuaweiVrpv8SSH">HuaweiVrpv8SSH</a></li>
</ul>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="netmiko.huawei.huawei.HuaweiBase" href="#netmiko.huawei.huawei.HuaweiBase">HuaweiBase</a></b></code>:
<ul class="hlist">
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.check_config_mode" href="#netmiko.huawei.huawei.HuaweiBase.check_config_mode">check_config_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.check_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.check_enable_mode">check_enable_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.cleanup" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.cleanup">cleanup</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.clear_buffer" href="../base_connection.html#netmiko.base_connection.BaseConnection.clear_buffer">clear_buffer</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.commit" href="../base_connection.html#netmiko.base_connection.BaseConnection.commit">commit</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.config_mode" href="../base_connection.html#netmiko.base_connection.BaseConnection.config_mode">config_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.disable_paging" href="../base_connection.html#netmiko.base_connection.BaseConnection.disable_paging">disable_paging</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.disconnect" href="../base_connection.html#netmiko.base_connection.BaseConnection.disconnect">disconnect</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.enable" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.enable">enable</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.establish_connection" href="../base_connection.html#netmiko.base_connection.BaseConnection.establish_connection">establish_connection</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.exit_config_mode" href="#netmiko.huawei.huawei.HuaweiBase.exit_config_mode">exit_config_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.exit_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.exit_enable_mode">exit_enable_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.find_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.find_prompt">find_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.is_alive" href="../base_connection.html#netmiko.base_connection.BaseConnection.is_alive">is_alive</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.normalize_cmd" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_cmd">normalize_cmd</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.normalize_linefeeds" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_linefeeds">normalize_linefeeds</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.paramiko_cleanup" href="../base_connection.html#netmiko.base_connection.BaseConnection.paramiko_cleanup">paramiko_cleanup</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.read_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel">read_channel</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.read_channel_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel_timing">read_channel_timing</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.read_until_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_pattern">read_until_pattern</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.read_until_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt">read_until_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.read_until_prompt_or_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt_or_pattern">read_until_prompt_or_pattern</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.run_ttp" href="../base_connection.html#netmiko.base_connection.BaseConnection.run_ttp">run_ttp</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.save_config" href="#netmiko.huawei.huawei.HuaweiBase.save_config">save_config</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.select_delay_factor" href="../base_connection.html#netmiko.base_connection.BaseConnection.select_delay_factor">select_delay_factor</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command">send_command</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_command_expect" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_expect">send_command_expect</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_command_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_timing">send_command_timing</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_config_from_file" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_from_file">send_config_from_file</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_config_set" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_set">send_config_set</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_multiline" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_multiline">send_multiline</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.session_preparation" href="#netmiko.huawei.huawei.HuaweiBase.session_preparation">session_preparation</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.set_base_prompt" href="#netmiko.huawei.huawei.HuaweiBase.set_base_prompt">set_base_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.set_terminal_width" href="../base_connection.html#netmiko.base_connection.BaseConnection.set_terminal_width">set_terminal_width</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.special_login_handler" href="../base_connection.html#netmiko.base_connection.BaseConnection.special_login_handler">special_login_handler</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.strip_ansi_escape_codes" href="#netmiko.huawei.huawei.HuaweiBase.strip_ansi_escape_codes">strip_ansi_escape_codes</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.strip_backspaces" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_backspaces">strip_backspaces</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.strip_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_command">strip_command</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.strip_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_prompt">strip_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.telnet_login" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.telnet_login">telnet_login</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.write_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.write_channel">write_channel</a></code></li>
</ul>
</li>
</ul>
</dd>
<dt id="netmiko.huawei.huawei.HuaweiTelnet"><code class="flex name class">
<span>class <span class="ident">HuaweiTelnet</span></span>
<span>(</span><span>ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[<a title="netmiko.session_log.SessionLog" href="../session_log.html#netmiko.session_log.SessionLog">SessionLog</a>] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)</span>
</code></dt>
<dd>
<div class="desc"><p>Huawei Telnet driver.</p>
<pre><code>    Initialize attributes for establishing connection to target device.

    :param ip: IP address of target device. Not required if &lt;code&gt;host&lt;/code&gt; is
        provided.

    :param host: Hostname of target device. Not required if &lt;code&gt;ip&lt;/code&gt; is
            provided.

    :param username: Username to authenticate against target device if
            required.

    :param password: Password to authenticate against target device if
            required.

    :param secret: The enable password if target device requires one.

    :param port: The destination port used to connect to the target
            device.

    :param device_type: Class selection based on device type.

    :param verbose: Enable additional messages to standard output.

    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).

    :param use_keys: Connect to target device using SSH keys.

    :param key_file: Filename path of the SSH key file to use.

    :param pkey: SSH key object to use.

    :param passphrase: Passphrase to use for encrypted key; password will be used for key
            decryption if not specified.

    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
            documentation for a description of the expected format.

    :param allow_agent: Enable use of SSH key-agent.

    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
            means unknown SSH host keys will be accepted).

    :param system_host_keys: Load host keys from the users known_hosts file.

    :param alt_host_keys: If &lt;code&gt;True&lt;/code&gt; host keys will be loaded from the file specified in
            alt_key_file.

    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).

    :param ssh_config_file: File name of OpenSSH configuration file.

    :param timeout: Connection timeout.

    :param session_timeout: Set a timeout for parallel requests.

    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.

    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).

    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
            Currently defaults to 0, for backwards compatibility (it will not attempt
            to keep the connection alive).

    :param default_enter: Character(s) to send to correspond to enter key (default:
</code></pre>
<p>).</p>
<pre><code>    :param response_return: Character(s) to use in normalized return data to represent
            enter key (default:
</code></pre>
<p>)</p>
<pre><code>    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
            to select smallest of global and specific. Sets default global_delay_factor to .1
            (default: True)

    :param session_log: File path or BufferedIOBase subclass object to write the session log to.

    :param session_log_record_writes: The session log generally only records channel reads due
            to eliminate command duplication due to command echo. You can enable this if you
            want to record both channel reads and channel writes in the log (default: False).

    :param session_log_file_mode: "write" or "append" for session_log file mode
            (default: "write")

    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
            (default: False)

    :param encoding: Encoding to be used when writing bytes to the output channel.
            (default: ascii)

    :param sock: An open socket or socket-like object (such as a &lt;code&gt;.Channel&lt;/code&gt;) to use for
            communication to the target host (default: None).

    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
            (default: None). Global attribute takes precedence over function &lt;code&gt;cmd\_verify&lt;/code&gt;
            argument. Value of &lt;code&gt;None&lt;/code&gt; indicates to use function &lt;code&gt;cmd\_verify&lt;/code&gt; argument.

    :param auto_connect: Control whether Netmiko automatically establishes the connection as
            part of the object creation (default: True).

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
            eliminated in Netmiko 5.x (default: False).
</code></pre></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class HuaweiTelnet(HuaweiBase):
    &#34;&#34;&#34;Huawei Telnet driver.&#34;&#34;&#34;

    def telnet_login(
        self,
        pri_prompt_terminator: str = r&#34;]\s*$&#34;,
        alt_prompt_terminator: str = r&#34;&gt;\s*$&#34;,
        username_pattern: str = r&#34;(?:user:|username|login|user name)&#34;,
        pwd_pattern: str = r&#34;assword&#34;,
        delay_factor: float = 1.0,
        max_loops: int = 20,
    ) -&gt; str:
        &#34;&#34;&#34;Telnet login for Huawei Devices&#34;&#34;&#34;

        delay_factor = self.select_delay_factor(delay_factor)
        password_change_prompt = r&#34;(Change now|Please choose &#39;YES&#39; or &#39;NO&#39;).+&#34;
        combined_pattern = r&#34;({}|{}|{})&#34;.format(
            pri_prompt_terminator, alt_prompt_terminator, password_change_prompt
        )

        output = &#34;&#34;
        return_msg = &#34;&#34;
        i = 1
        while i &lt;= max_loops:
            try:
                # Search for username pattern / send username
                output = self.read_until_pattern(
                    pattern=username_pattern, re_flags=re.I
                )
                return_msg += output
                self.write_channel(self.username + self.TELNET_RETURN)

                # Search for password pattern / send password
                output = self.read_until_pattern(pattern=pwd_pattern, re_flags=re.I)
                return_msg += output
                assert self.password is not None
                self.write_channel(self.password + self.TELNET_RETURN)

                # Waiting for combined output
                output = self.read_until_pattern(pattern=combined_pattern)
                return_msg += output

                # Search for password change prompt, send &#34;N&#34;
                if re.search(password_change_prompt, output):
                    self.write_channel(&#34;N&#34; + self.TELNET_RETURN)
                    output = self.read_until_pattern(pattern=combined_pattern)
                    return_msg += output

                # Check if proper data received
                if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
                    alt_prompt_terminator, output, flags=re.M
                ):
                    return return_msg

                self.write_channel(self.TELNET_RETURN)
                time.sleep(0.5 * delay_factor)
                i += 1

            except EOFError:
                assert self.remote_conn is not None
                self.remote_conn.close()
                msg = f&#34;Login failed: {self.host}&#34;
                raise NetmikoAuthenticationException(msg)

        # Last try to see if we already logged in
        self.write_channel(self.TELNET_RETURN)
        time.sleep(0.5 * delay_factor)
        output = self.read_channel()
        return_msg += output
        if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
            alt_prompt_terminator, output, flags=re.M
        ):
            return return_msg

        assert self.remote_conn is not None
        self.remote_conn.close()
        msg = f&#34;Login failed: {self.host}&#34;
        raise NetmikoAuthenticationException(msg)</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="netmiko.huawei.huawei.HuaweiBase" href="#netmiko.huawei.huawei.HuaweiBase">HuaweiBase</a></li>
<li><a title="netmiko.no_enable.NoEnable" href="../no_enable.html#netmiko.no_enable.NoEnable">NoEnable</a></li>
<li><a title="netmiko.cisco_base_connection.CiscoBaseConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection">CiscoBaseConnection</a></li>
<li><a title="netmiko.base_connection.BaseConnection" href="../base_connection.html#netmiko.base_connection.BaseConnection">BaseConnection</a></li>
</ul>
<h3>Methods</h3>
<dl>
<dt id="netmiko.huawei.huawei.HuaweiTelnet.telnet_login"><code class="name flex">
<span>def <span class="ident">telnet_login</span></span>(<span>self, pri_prompt_terminator: str = ']\\s*$', alt_prompt_terminator: str = &#x27;&gt;\\s*$&#x27;, username_pattern: str = '(?:user:|username|login|user name)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>Telnet login for Huawei Devices</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def telnet_login(
    self,
    pri_prompt_terminator: str = r&#34;]\s*$&#34;,
    alt_prompt_terminator: str = r&#34;&gt;\s*$&#34;,
    username_pattern: str = r&#34;(?:user:|username|login|user name)&#34;,
    pwd_pattern: str = r&#34;assword&#34;,
    delay_factor: float = 1.0,
    max_loops: int = 20,
) -&gt; str:
    &#34;&#34;&#34;Telnet login for Huawei Devices&#34;&#34;&#34;

    delay_factor = self.select_delay_factor(delay_factor)
    password_change_prompt = r&#34;(Change now|Please choose &#39;YES&#39; or &#39;NO&#39;).+&#34;
    combined_pattern = r&#34;({}|{}|{})&#34;.format(
        pri_prompt_terminator, alt_prompt_terminator, password_change_prompt
    )

    output = &#34;&#34;
    return_msg = &#34;&#34;
    i = 1
    while i &lt;= max_loops:
        try:
            # Search for username pattern / send username
            output = self.read_until_pattern(
                pattern=username_pattern, re_flags=re.I
            )
            return_msg += output
            self.write_channel(self.username + self.TELNET_RETURN)

            # Search for password pattern / send password
            output = self.read_until_pattern(pattern=pwd_pattern, re_flags=re.I)
            return_msg += output
            assert self.password is not None
            self.write_channel(self.password + self.TELNET_RETURN)

            # Waiting for combined output
            output = self.read_until_pattern(pattern=combined_pattern)
            return_msg += output

            # Search for password change prompt, send &#34;N&#34;
            if re.search(password_change_prompt, output):
                self.write_channel(&#34;N&#34; + self.TELNET_RETURN)
                output = self.read_until_pattern(pattern=combined_pattern)
                return_msg += output

            # Check if proper data received
            if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
                alt_prompt_terminator, output, flags=re.M
            ):
                return return_msg

            self.write_channel(self.TELNET_RETURN)
            time.sleep(0.5 * delay_factor)
            i += 1

        except EOFError:
            assert self.remote_conn is not None
            self.remote_conn.close()
            msg = f&#34;Login failed: {self.host}&#34;
            raise NetmikoAuthenticationException(msg)

    # Last try to see if we already logged in
    self.write_channel(self.TELNET_RETURN)
    time.sleep(0.5 * delay_factor)
    output = self.read_channel()
    return_msg += output
    if re.search(pri_prompt_terminator, output, flags=re.M) or re.search(
        alt_prompt_terminator, output, flags=re.M
    ):
        return return_msg

    assert self.remote_conn is not None
    self.remote_conn.close()
    msg = f&#34;Login failed: {self.host}&#34;
    raise NetmikoAuthenticationException(msg)</code></pre>
</details>
</dd>
</dl>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="netmiko.huawei.huawei.HuaweiBase" href="#netmiko.huawei.huawei.HuaweiBase">HuaweiBase</a></b></code>:
<ul class="hlist">
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.check_config_mode" href="#netmiko.huawei.huawei.HuaweiBase.check_config_mode">check_config_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.check_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.check_enable_mode">check_enable_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.cleanup" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.cleanup">cleanup</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.clear_buffer" href="../base_connection.html#netmiko.base_connection.BaseConnection.clear_buffer">clear_buffer</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.commit" href="../base_connection.html#netmiko.base_connection.BaseConnection.commit">commit</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.config_mode" href="../base_connection.html#netmiko.base_connection.BaseConnection.config_mode">config_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.disable_paging" href="../base_connection.html#netmiko.base_connection.BaseConnection.disable_paging">disable_paging</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.disconnect" href="../base_connection.html#netmiko.base_connection.BaseConnection.disconnect">disconnect</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.enable" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.enable">enable</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.establish_connection" href="../base_connection.html#netmiko.base_connection.BaseConnection.establish_connection">establish_connection</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.exit_config_mode" href="#netmiko.huawei.huawei.HuaweiBase.exit_config_mode">exit_config_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.exit_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.exit_enable_mode">exit_enable_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.find_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.find_prompt">find_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.is_alive" href="../base_connection.html#netmiko.base_connection.BaseConnection.is_alive">is_alive</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.normalize_cmd" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_cmd">normalize_cmd</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.normalize_linefeeds" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_linefeeds">normalize_linefeeds</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.paramiko_cleanup" href="../base_connection.html#netmiko.base_connection.BaseConnection.paramiko_cleanup">paramiko_cleanup</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.read_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel">read_channel</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.read_channel_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel_timing">read_channel_timing</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.read_until_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_pattern">read_until_pattern</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.read_until_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt">read_until_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.read_until_prompt_or_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt_or_pattern">read_until_prompt_or_pattern</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.run_ttp" href="../base_connection.html#netmiko.base_connection.BaseConnection.run_ttp">run_ttp</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.save_config" href="#netmiko.huawei.huawei.HuaweiBase.save_config">save_config</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.select_delay_factor" href="../base_connection.html#netmiko.base_connection.BaseConnection.select_delay_factor">select_delay_factor</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command">send_command</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_command_expect" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_expect">send_command_expect</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_command_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_timing">send_command_timing</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_config_from_file" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_from_file">send_config_from_file</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_config_set" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_set">send_config_set</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.send_multiline" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_multiline">send_multiline</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.session_preparation" href="#netmiko.huawei.huawei.HuaweiBase.session_preparation">session_preparation</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.set_base_prompt" href="#netmiko.huawei.huawei.HuaweiBase.set_base_prompt">set_base_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.set_terminal_width" href="../base_connection.html#netmiko.base_connection.BaseConnection.set_terminal_width">set_terminal_width</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.special_login_handler" href="../base_connection.html#netmiko.base_connection.BaseConnection.special_login_handler">special_login_handler</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.strip_ansi_escape_codes" href="#netmiko.huawei.huawei.HuaweiBase.strip_ansi_escape_codes">strip_ansi_escape_codes</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.strip_backspaces" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_backspaces">strip_backspaces</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.strip_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_command">strip_command</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.strip_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_prompt">strip_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.write_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.write_channel">write_channel</a></code></li>
</ul>
</li>
</ul>
</dd>
<dt id="netmiko.huawei.huawei.HuaweiVrpv8SSH"><code class="flex name class">
<span>class <span class="ident">HuaweiVrpv8SSH</span></span>
<span>(</span><span>ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[<a title="netmiko.session_log.SessionLog" href="../session_log.html#netmiko.session_log.SessionLog">SessionLog</a>] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)</span>
</code></dt>
<dd>
<div class="desc"><p>Huawei SSH driver.</p>
<pre><code>    Initialize attributes for establishing connection to target device.

    :param ip: IP address of target device. Not required if &lt;code&gt;host&lt;/code&gt; is
        provided.

    :param host: Hostname of target device. Not required if &lt;code&gt;ip&lt;/code&gt; is
            provided.

    :param username: Username to authenticate against target device if
            required.

    :param password: Password to authenticate against target device if
            required.

    :param secret: The enable password if target device requires one.

    :param port: The destination port used to connect to the target
            device.

    :param device_type: Class selection based on device type.

    :param verbose: Enable additional messages to standard output.

    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).

    :param use_keys: Connect to target device using SSH keys.

    :param key_file: Filename path of the SSH key file to use.

    :param pkey: SSH key object to use.

    :param passphrase: Passphrase to use for encrypted key; password will be used for key
            decryption if not specified.

    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
            documentation for a description of the expected format.

    :param allow_agent: Enable use of SSH key-agent.

    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
            means unknown SSH host keys will be accepted).

    :param system_host_keys: Load host keys from the users known_hosts file.

    :param alt_host_keys: If &lt;code&gt;True&lt;/code&gt; host keys will be loaded from the file specified in
            alt_key_file.

    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).

    :param ssh_config_file: File name of OpenSSH configuration file.

    :param timeout: Connection timeout.

    :param session_timeout: Set a timeout for parallel requests.

    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.

    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).

    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
            Currently defaults to 0, for backwards compatibility (it will not attempt
            to keep the connection alive).

    :param default_enter: Character(s) to send to correspond to enter key (default:
</code></pre>
<p>).</p>
<pre><code>    :param response_return: Character(s) to use in normalized return data to represent
            enter key (default:
</code></pre>
<p>)</p>
<pre><code>    :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
            to select smallest of global and specific. Sets default global_delay_factor to .1
            (default: True)

    :param session_log: File path or BufferedIOBase subclass object to write the session log to.

    :param session_log_record_writes: The session log generally only records channel reads due
            to eliminate command duplication due to command echo. You can enable this if you
            want to record both channel reads and channel writes in the log (default: False).

    :param session_log_file_mode: "write" or "append" for session_log file mode
            (default: "write")

    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
            (default: False)

    :param encoding: Encoding to be used when writing bytes to the output channel.
            (default: ascii)

    :param sock: An open socket or socket-like object (such as a &lt;code&gt;.Channel&lt;/code&gt;) to use for
            communication to the target host (default: None).

    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
            (default: None). Global attribute takes precedence over function &lt;code&gt;cmd\_verify&lt;/code&gt;
            argument. Value of &lt;code&gt;None&lt;/code&gt; indicates to use function &lt;code&gt;cmd\_verify&lt;/code&gt; argument.

    :param auto_connect: Control whether Netmiko automatically establishes the connection as
            part of the object creation (default: True).

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
            eliminated in Netmiko 5.x (default: False).
</code></pre></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">class HuaweiVrpv8SSH(HuaweiSSH):
    def send_config_set(
        self,
        config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
        exit_config_mode: bool = False,
        **kwargs: Any,
    ) -&gt; str:
        &#34;&#34;&#34;Huawei VRPv8 requires you not exit from configuration mode.&#34;&#34;&#34;
        return super().send_config_set(
            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
        )

    def commit(
        self,
        comment: str = &#34;&#34;,
        read_timeout: float = 120.0,
        delay_factor: Optional[float] = None,
    ) -&gt; str:
        &#34;&#34;&#34;
        Commit the candidate configuration.

        Commit the entered configuration. Raise an error and return the failure
        if the commit fails.

        default:
           command_string = commit
        comment:
           command_string = commit comment &lt;comment&gt;

        delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
        &#34;&#34;&#34;

        if delay_factor is not None:
            warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning)

        error_marker = &#34;Failed to generate committed config&#34;
        command_string = &#34;commit&#34;

        if comment:
            command_string += f&#39; comment &#34;{comment}&#34;&#39;

        output = self.config_mode()
        output += self._send_command_str(
            command_string,
            strip_prompt=False,
            strip_command=False,
            read_timeout=read_timeout,
            expect_string=r&#34;]&#34;,
        )
        output += self.exit_config_mode()

        if error_marker in output:
            raise ValueError(f&#34;Commit failed with following errors:\n\n{output}&#34;)
        return output

    def save_config(self, *args: Any, **kwargs: Any) -&gt; str:
        &#34;&#34;&#34;Not Implemented&#34;&#34;&#34;
        raise NotImplementedError</code></pre>
</details>
<h3>Ancestors</h3>
<ul class="hlist">
<li><a title="netmiko.huawei.huawei.HuaweiSSH" href="#netmiko.huawei.huawei.HuaweiSSH">HuaweiSSH</a></li>
<li><a title="netmiko.huawei.huawei.HuaweiBase" href="#netmiko.huawei.huawei.HuaweiBase">HuaweiBase</a></li>
<li><a title="netmiko.no_enable.NoEnable" href="../no_enable.html#netmiko.no_enable.NoEnable">NoEnable</a></li>
<li><a title="netmiko.cisco_base_connection.CiscoBaseConnection" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection">CiscoBaseConnection</a></li>
<li><a title="netmiko.base_connection.BaseConnection" href="../base_connection.html#netmiko.base_connection.BaseConnection">BaseConnection</a></li>
</ul>
<h3>Methods</h3>
<dl>
<dt id="netmiko.huawei.huawei.HuaweiVrpv8SSH.commit"><code class="name flex">
<span>def <span class="ident">commit</span></span>(<span>self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>Commit the candidate configuration.</p>
<p>Commit the entered configuration. Raise an error and return the failure
if the commit fails.</p>
<p>default:
command_string = commit
comment:
command_string = commit comment <comment></p>
<p>delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def commit(
    self,
    comment: str = &#34;&#34;,
    read_timeout: float = 120.0,
    delay_factor: Optional[float] = None,
) -&gt; str:
    &#34;&#34;&#34;
    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure
    if the commit fails.

    default:
       command_string = commit
    comment:
       command_string = commit comment &lt;comment&gt;

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
    &#34;&#34;&#34;

    if delay_factor is not None:
        warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning)

    error_marker = &#34;Failed to generate committed config&#34;
    command_string = &#34;commit&#34;

    if comment:
        command_string += f&#39; comment &#34;{comment}&#34;&#39;

    output = self.config_mode()
    output += self._send_command_str(
        command_string,
        strip_prompt=False,
        strip_command=False,
        read_timeout=read_timeout,
        expect_string=r&#34;]&#34;,
    )
    output += self.exit_config_mode()

    if error_marker in output:
        raise ValueError(f&#34;Commit failed with following errors:\n\n{output}&#34;)
    return output</code></pre>
</details>
</dd>
<dt id="netmiko.huawei.huawei.HuaweiVrpv8SSH.save_config"><code class="name flex">
<span>def <span class="ident">save_config</span></span>(<span>self, *args: Any, **kwargs: Any) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>Not Implemented</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def save_config(self, *args: Any, **kwargs: Any) -&gt; str:
    &#34;&#34;&#34;Not Implemented&#34;&#34;&#34;
    raise NotImplementedError</code></pre>
</details>
</dd>
<dt id="netmiko.huawei.huawei.HuaweiVrpv8SSH.send_config_set"><code class="name flex">
<span>def <span class="ident">send_config_set</span></span>(<span>self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str</span>
</code></dt>
<dd>
<div class="desc"><p>Huawei VRPv8 requires you not exit from configuration mode.</p></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def send_config_set(
    self,
    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
    exit_config_mode: bool = False,
    **kwargs: Any,
) -&gt; str:
    &#34;&#34;&#34;Huawei VRPv8 requires you not exit from configuration mode.&#34;&#34;&#34;
    return super().send_config_set(
        config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    )</code></pre>
</details>
</dd>
</dl>
<h3>Inherited members</h3>
<ul class="hlist">
<li><code><b><a title="netmiko.huawei.huawei.HuaweiSSH" href="#netmiko.huawei.huawei.HuaweiSSH">HuaweiSSH</a></b></code>:
<ul class="hlist">
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.check_config_mode" href="#netmiko.huawei.huawei.HuaweiBase.check_config_mode">check_config_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.check_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.check_enable_mode">check_enable_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.cleanup" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.cleanup">cleanup</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.clear_buffer" href="../base_connection.html#netmiko.base_connection.BaseConnection.clear_buffer">clear_buffer</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.config_mode" href="../base_connection.html#netmiko.base_connection.BaseConnection.config_mode">config_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.disable_paging" href="../base_connection.html#netmiko.base_connection.BaseConnection.disable_paging">disable_paging</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.disconnect" href="../base_connection.html#netmiko.base_connection.BaseConnection.disconnect">disconnect</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.enable" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.enable">enable</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.establish_connection" href="../base_connection.html#netmiko.base_connection.BaseConnection.establish_connection">establish_connection</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.exit_config_mode" href="#netmiko.huawei.huawei.HuaweiBase.exit_config_mode">exit_config_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.exit_enable_mode" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.exit_enable_mode">exit_enable_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.find_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.find_prompt">find_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.is_alive" href="../base_connection.html#netmiko.base_connection.BaseConnection.is_alive">is_alive</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.normalize_cmd" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_cmd">normalize_cmd</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.normalize_linefeeds" href="../base_connection.html#netmiko.base_connection.BaseConnection.normalize_linefeeds">normalize_linefeeds</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.paramiko_cleanup" href="../base_connection.html#netmiko.base_connection.BaseConnection.paramiko_cleanup">paramiko_cleanup</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.read_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel">read_channel</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.read_channel_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_channel_timing">read_channel_timing</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.read_until_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_pattern">read_until_pattern</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.read_until_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt">read_until_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.read_until_prompt_or_pattern" href="../base_connection.html#netmiko.base_connection.BaseConnection.read_until_prompt_or_pattern">read_until_prompt_or_pattern</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.run_ttp" href="../base_connection.html#netmiko.base_connection.BaseConnection.run_ttp">run_ttp</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.select_delay_factor" href="../base_connection.html#netmiko.base_connection.BaseConnection.select_delay_factor">select_delay_factor</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.send_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command">send_command</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.send_command_expect" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_expect">send_command_expect</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.send_command_timing" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_command_timing">send_command_timing</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.send_config_from_file" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_config_from_file">send_config_from_file</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.send_multiline" href="../base_connection.html#netmiko.base_connection.BaseConnection.send_multiline">send_multiline</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.session_preparation" href="#netmiko.huawei.huawei.HuaweiBase.session_preparation">session_preparation</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.set_base_prompt" href="#netmiko.huawei.huawei.HuaweiBase.set_base_prompt">set_base_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.set_terminal_width" href="../base_connection.html#netmiko.base_connection.BaseConnection.set_terminal_width">set_terminal_width</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.special_login_handler" href="../base_connection.html#netmiko.base_connection.BaseConnection.special_login_handler">special_login_handler</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.strip_ansi_escape_codes" href="#netmiko.huawei.huawei.HuaweiBase.strip_ansi_escape_codes">strip_ansi_escape_codes</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.strip_backspaces" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_backspaces">strip_backspaces</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.strip_command" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_command">strip_command</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.strip_prompt" href="../base_connection.html#netmiko.base_connection.BaseConnection.strip_prompt">strip_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.telnet_login" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoBaseConnection.telnet_login">telnet_login</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiSSH.write_channel" href="../base_connection.html#netmiko.base_connection.BaseConnection.write_channel">write_channel</a></code></li>
</ul>
</li>
</ul>
</dd>
</dl>
</section>
</article>
<nav id="sidebar">
<h1>Index</h1>
<div class="toc">
<ul></ul>
</div>
<ul id="index">
<li><h3>Super-module</h3>
<ul>
<li><code><a title="netmiko.huawei" href="index.html">netmiko.huawei</a></code></li>
</ul>
</li>
<li><h3><a href="#header-classes">Classes</a></h3>
<ul>
<li>
<h4><code><a title="netmiko.huawei.huawei.HuaweiBase" href="#netmiko.huawei.huawei.HuaweiBase">HuaweiBase</a></code></h4>
<ul class="">
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.check_config_mode" href="#netmiko.huawei.huawei.HuaweiBase.check_config_mode">check_config_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.exit_config_mode" href="#netmiko.huawei.huawei.HuaweiBase.exit_config_mode">exit_config_mode</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.save_config" href="#netmiko.huawei.huawei.HuaweiBase.save_config">save_config</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.session_preparation" href="#netmiko.huawei.huawei.HuaweiBase.session_preparation">session_preparation</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.set_base_prompt" href="#netmiko.huawei.huawei.HuaweiBase.set_base_prompt">set_base_prompt</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiBase.strip_ansi_escape_codes" href="#netmiko.huawei.huawei.HuaweiBase.strip_ansi_escape_codes">strip_ansi_escape_codes</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="netmiko.huawei.huawei.HuaweiSSH" href="#netmiko.huawei.huawei.HuaweiSSH">HuaweiSSH</a></code></h4>
</li>
<li>
<h4><code><a title="netmiko.huawei.huawei.HuaweiTelnet" href="#netmiko.huawei.huawei.HuaweiTelnet">HuaweiTelnet</a></code></h4>
<ul class="">
<li><code><a title="netmiko.huawei.huawei.HuaweiTelnet.telnet_login" href="#netmiko.huawei.huawei.HuaweiTelnet.telnet_login">telnet_login</a></code></li>
</ul>
</li>
<li>
<h4><code><a title="netmiko.huawei.huawei.HuaweiVrpv8SSH" href="#netmiko.huawei.huawei.HuaweiVrpv8SSH">HuaweiVrpv8SSH</a></code></h4>
<ul class="">
<li><code><a title="netmiko.huawei.huawei.HuaweiVrpv8SSH.commit" href="#netmiko.huawei.huawei.HuaweiVrpv8SSH.commit">commit</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiVrpv8SSH.save_config" href="#netmiko.huawei.huawei.HuaweiVrpv8SSH.save_config">save_config</a></code></li>
<li><code><a title="netmiko.huawei.huawei.HuaweiVrpv8SSH.send_config_set" href="#netmiko.huawei.huawei.HuaweiVrpv8SSH.send_config_set">send_config_set</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
</main>
<footer id="footer">
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.10.0</a>.</p>
</footer>
</body>
</html>